package edu.sctu.practice.class02.hujie.cgs.assign04;

/**
 * Created by hp on 2015/12/4.
 */
public class Addition {
    public int a;

    public Addition(int a) {
        this.a = a;
    }

    public void addUp() {
        long result = 0;
        for (int i = a; i > 0; i--) {
            result = result + a;
            a--;
        }
        System.out.println("结果：" + result);
    }

    public static void main(String[] args) {
        Addition a = new Addition(999999999);
        a.addUp();
    }
}
